using System;
using System.Collections.Generic;
using System.Text;

using Crainiate.Data.Persistence;
using Crainiate.Data.Persistence.Providers;

namespace Crainiate.Data.Persistence.Testing
{
    [Serializable]
    public class Person: Table
    {
        //Property variables
        private int _Id;
        private string _FirstNames;
        private string _LastNames;
        private DateTime? _DateOfBirth;
        private Phone _Phone;

        #region Interface

        public Person()
        {

        }

        public Person(Command command): base(command)
        {

        }

        [PrimaryKey]
        public virtual int Id
        {
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }

        [Column]
        public virtual string FirstNames
        {
            get
            {
                return _FirstNames;
            }
            set
            {
                _FirstNames = value;
            }
        }

        [Column]
        public string LastNames
        {
            get
            {
                return _LastNames;
            }
            set
            {
                _LastNames = value;
            }
        }

        [Column]
        public Nullable<DateTime> DateOfBirth
        {
            get
            {
                return _DateOfBirth;
            }
            set
            {
                _DateOfBirth = value;
            }
        }

        [Column]
        public Phone Phone
        {
            get
            {
                return _Phone;
            }
            set
            {
                _Phone = value;
            }
        }

        #endregion
    }
}